package com.yylc.cscore.controller;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiangnan
 * date 2018/4/26
 */
@RestController
public class IndexController {

    @GetMapping("/")
    public String index() {
        return "hi cscore";
    }

    @GetMapping("/person")
    public Person person() {
        return new Person("luo", 25);
    }

    @Data
    @AllArgsConstructor
    static class Person {
        private String name;
        private int age;
    }

}
